/*
* Copyright (c) 2014 Qunar.com. All Rights Reserved.
*/
package net.oschina.bilbodai.common.beanutil.runtime;

/**
 * @author qt-maodai  Date: 15-8-7 Time: 下午3:23
 * @version $Id$
 */
public class RuntimeClassLoader extends ClassLoader implements IRuntimeClassLoader {

    public RuntimeClassLoader(ClassLoader parent) {
        super(parent);
    }

    public static RuntimeClassLoader getCurThreadParentLoader() {
        return new RuntimeClassLoader(Thread.currentThread().getContextClassLoader());
    }

    public Class<?> defineClass(String name, byte[] b) {
        return defineClass(name, b, 0, b.length);
    }
}